package com.benli.voteme.model;

import com.benli.voteme.constants.Role;

import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.annotation.Version;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;
import java.util.Set;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * The type User.
 *
 * @author Jin Benli
 * @version 1.0.0
 * @date 7 /2/16
 */
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Document
public class User {

    @Id
    private String id;

    @CreatedDate
    private Date createTime;

    @LastModifiedDate
    private Date updateTime;

    @Version
    private Long version;

    private Set<Role> roles;

    private Boolean isDeleted;

    private Boolean isDisabled;

}
